* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    touch-action: none;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
}

.screen.active {
    display: flex;
}

/* ===== 主菜单样式 ===== */
.menu-container {
    text-align: center;
    padding: 15px;
    max-width: 850px;
    width: 95%;
}

.game-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: #fff;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 5px;
    animation: bounce 2s infinite;
}

.subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #ffe4f0;
    margin-bottom: 20px;
}

.menu-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-link {
    color: #ffe4f0;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.game-link:hover,
.game-link:active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.game-icon {
    display: inline-block;
    transform: translateY(-1.5px);
}

.git-link,
.blog-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.git-link:hover,
.git-link:active {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(199, 29, 35, 0.3);
}

.blog-link:hover,
.blog-link:active {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.git-link svg,
.blog-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.game-options {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.option-group {
    margin-bottom: 20px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #667eea;
    margin-bottom: 10px;
    font-weight: bold;
}

.toy-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.toy-btn {
    background: linear-gradient(135deg, #ffd89b 0%, #ff6b9d 100%);
    border: none;
    border-radius: 15px;
    padding: 12px 8px;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    font-weight: bold;
}

.toy-btn:hover, .toy-btn:active {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.toy-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
}

.time-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.time-btn {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    border-radius: 12px;
    padding: 10px 5px;
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    font-weight: bold;
}

.time-btn:hover, .time-btn:active {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.time-btn.selected {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(132, 250, 176, 0.5);
    color: #fff;
}

.play-button {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border: none;
    border-radius: 50px;
    padding: 18px 50px;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    color: #333;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.play-button:hover, .play-button:active {
    transform: scale(1.08);
}

.secondary-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    padding: 15px 35px;
    font-size: clamp(0.95rem, 2.8vw, 1.3rem);
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.secondary-button:hover, .secondary-button:active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ===== 游戏界面样式 ===== */
#game-screen {
    background: linear-gradient(135deg, #5a3e2b 0%, #3d2817 100%);
    flex-direction: column;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    color: white;
}

.timer, .score {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.menu-button {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-button:hover, .menu-button:active {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

#game-canvas {
    flex: 1;
    display: block;
    cursor: none;
    touch-action: none;
}

.paw-indicator {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
}

/* ===== 游戏结束界面 ===== */
.gameover-container {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    max-width: 600px;
    width: 90%;
}

.gameover-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: #667eea;
    margin-bottom: 30px;
}

.final-score {
    margin: 30px 0;
}

.final-score p {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: #666;
}

.final-score h2 {
    font-size: clamp(4rem, 12vw, 8rem);
    color: #ff6b9d;
    margin: 10px 0;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.play-time {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #667eea;
    font-weight: bold;
    margin: 15px 0;
    display: none;
}

.cat-reaction {
    font-size: clamp(4rem, 10vw, 6rem);
    margin: 20px 0;
    animation: bounce 1s infinite;
}

/* ===== 动画 ===== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== 响应式设计 ===== */
@media (max-width: 600px) {
    .menu-container {
        padding: 10px;
    }
    
    .game-title {
        margin-bottom: 3px;
    }
    
    .subtitle {
        margin-bottom: 15px;
    }
    
    .game-options {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .option-group {
        margin-bottom: 15px;
    }
    
    .toy-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .toy-btn {
        padding: 10px 5px;
    }
    
    .time-selector {
        gap: 6px;
    }
    
    .time-btn {
        padding: 8px 3px;
    }
    
    .play-button {
        padding: 15px 40px;
    }
    
    .game-header {
        padding: 10px;
    }
    
    .timer, .score {
        font-size: 1.5rem;
    }
}

/* ===== 触摸反馈 ===== */
.touch-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    pointer-events: none;
    animation: touch-burst 0.6s ease-out forwards;
}

@keyframes touch-burst {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

